import { CCFloat, Vec3, _decorator } from 'cc';
const { ccclass, property } = _decorator;
import { PropType, ValueType } from "./Values";

/**
 * 动作属性值基类
 */
@ccclass('ActionProp')
export class ActionProp {
    @property({ type: PropType })
    public type: PropType = PropType.from;
    @property({ type: ValueType })
    public valueType: ValueType = ValueType.relative;

    valueTo: any;
    valueFrom: any;
}


/**
 * 动作属性值-vec3
 */
@ccclass('ActionPropVec3')
export class ActionPropVec3 extends ActionProp {
    @property({})
    public valueFrom = new Vec3();
    @property({})
    public valueTo = new Vec3();
}

/**
 * 动作属性值-float
 */
@ccclass('ActionPropFloat')
export class ActionPropFloat extends ActionProp {
    @property({ type: CCFloat })
    public valueFrom = 0;
    @property({ type: CCFloat })
    public valueTo = 0;
}